@extends('Home/Layout/base')

@section('title', $webInformation['WEB_NAME'] . ' ' . $article['title'])

@section('content')
    
    <article class="am-article blog-article-p">

        <div class="am-article-hd">
          <h1 class="am-article-title blog-text-center">{{$article['title']}}</h1>

          <p class="am-article-meta blog-text-center">
            @if($article['is_top'] == 1)
            <span class="am-badge am-badge-danger am-radius am-text-small">顶置</span> &nbsp; &nbsp;&nbsp;&nbsp;
            @endif
            
            {{-- 作者 --}}
            <i class="am-icon-user"></i>
            <span>&nbsp; {{$article['author']}} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
            
            {{-- 更新时间 --}}
            <i class="am-icon-clock-o"></i>
            <span>&nbsp; {{ substr($article['updated_at'], 0, 10)}} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>

            {{-- 所属分组 --}}
            <i class="am-icon-tag"></i>
            <span>&nbsp; {{ $simpleCategories[$article['category_id']] }}</span>
          </p>

        </div>   

        <div class="am-article-bd">
            <img src="{{asset('upload'). '/' . $article['cover']}}" alt="" class="blog-entry-img blog-article-margin">
            前言：
            <p class="am-article-lead">{{$article['description']}}</p>
            
            {{-- 文章内容 --}}
            {!! $article['html'] !!}
        </div>
        
        {{-- 标签 --}}
        <div class="am-g blog-article-widget blog-article-margin">
          <div class="am-u-lg-4 am-u-md-5 am-u-sm-7 am-u-sm-centered blog-text-center">
            <span class="am-icon-tags"> &nbsp;</span>
            @php
                $keywords = explode(' ', $article['keywords']);
                foreach($keywords as $key) {
                    echo "<a href=''>{$key}</a>";
                }
            @endphp
            
            <hr>
            {{-- <a href=""><span class="am-icon-qq am-icon-fw am-primary blog-icon"></span></a>
            <a href=""><span class="am-icon-wechat am-icon-fw blog-icon"></span></a>
            <a href=""><span class="am-icon-weibo am-icon-fw blog-icon"></span></a> --}}
          </div>
        </div>
        
        {{-- 评论 --}}
{{--        <form class="am-form am-g">--}}
{{--        --}}
{{--            <h3 class="blog-comment">评论</h3>--}}
{{--          <fieldset>--}}
{{--            <div class="am-form-group am-u-sm-4 blog-clear-left">--}}
{{--              <input type="text" class="" placeholder="名字">--}}
{{--            </div>--}}
{{--            <div class="am-form-group am-u-sm-4">--}}
{{--              <input type="email" class="" placeholder="邮箱">--}}
{{--            </div>--}}

{{--            <div class="am-form-group am-u-sm-4 blog-clear-right">--}}
{{--              <input type="password" class="" placeholder="网站">--}}
{{--            </div>--}}
{{--        --}}
{{--            <div class="am-form-group">--}}
{{--              <textarea class="" rows="5" placeholder="一字千金"></textarea>--}}
{{--            </div>--}}
{{--        --}}
{{--            <p><button type="submit" class="am-btn am-btn-default">发表评论</button></p>--}}
{{--          </fieldset>--}}
{{--        </form>--}}


    </article>
@endsection